<template>
  <div class="my-product">
    <h3>标题:{{title}}</h3>
   <p>价格:{{money}}</p>
    <button @click="kan">点我</button>
  </div>
</template>

<script> 

export default {
//  props:['title','money','info','id'],
props: {
  title: {
  type : String,
  required : true,

},
id: {
  type : Number,
  required: true 
},
money: {
  type : Number,
  required: true 
}
},
 methods: {
  kan() {
    this.$emit('kan',this.id)
  }
 }
}

</script>

<style>
.my-product {
  width: 400px;
  padding: 20px;
  border: 2px solid #000;
  border-radius: 5px;
  margin: 10px;
}
</style>